<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
            border: 0;
            list-style: none;
        }

        .box {
            position: relative;
            overflow: hidden;
            width: 650px;
            height: 320px;
            border: 5px solid #000;
            margin: 100px auto;
        }

        .box ul {
            /* z-index: 1; */
            /* position: relative; */
            /* overflow: hidden; */
        }

        .box ul li {
            /* position: absolute; */
            /* top: 0;
            left: 0; */
        }

        .box img {
            width: 650px;
            height: 320px;
        }

        .box ol {
            z-index: 2;
            position: absolute;
            color: #fff;
            right: 10px;
            bottom: 10px;
        }

        .box ol li {
            width: 15px;
            height: 15px;
            text-align: center;
            line-height: 20px;
            float: left;
            padding: 5px;
            background: #ccc;
            margin-right: 2px;
        }

        .box ol .cur {
            background: #666;
            border: 1px solid #f40;
            margin-top: -1px;
        }
    </style>


    <script src="js/jquery.min.3.4.1.js"></script>
</head>

<body>

        <div class="box">

                <ol>
                    <li class="cur">1</li>
                    <li>2</li>
                    <li>3</li>
                    <li>4</li>
                </ol>
        
                <ul>
                    <li><img src="images/01.webp" alt=""></li>
                    <li><img src="images/02.webp" alt=""></li>
                    <li><img src="images/03.webp" alt=""></li>
                    <li><img src="images/04.webp" alt=""></li>
                </ul>
        
        
            </div>
  
</body>
<script>


        $(function () {
            $('ol li').mouseenter(function () {
                $(this).addClass('cur').siblings().removeClass('cur');
                var index = $(this).index();
                $('ul li').eq(index).stop().slideDown(500).siblings().stop().slideUp(500);
            });
        });

    </script>
</html>